package com.fauks.study.msweb;

import com.fauks.study.msweb.servlet.SecondServlet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;


@SpringBootApplication
@ServletComponentScan
public class WebApp {
    public static void main(String[] args) {
        SpringApplication.run(WebApp.class, args);
    }

    @Bean
    public ServletRegistrationBean<SecondServlet> servletRegistration() {
        return new ServletRegistrationBean<>(new SecondServlet(), "/second");
    }
}
